diff --git a/src/main/java/com/ModeratorElection/MainView.java b/src/main/java/com/ModeratorElection/MainView.java index d417b06..15e69ca 100644 --- a/src/main/java/com/ModeratorElection/MainView.java +++ b/src/main/java/com/ModeratorElection/MainView.java @@ -12,9 +12,9 @@ import com.vaadin.flow.component.notification.Notification; import com.vaadin.flow.component.notification.NotificationVariant; import com.vaadin.flow.component.orderedlayout.HorizontalLayout; import com.vaadin.flow.component.orderedlayout.VerticalLayout; -import com.vaadin.flow.router.PreserveOnRefresh; import com.vaadin.flow.router.Route; import com.vaadin.flow.router.PageTitle; +import com.vaadin.flow.spring.annotation.RouteScope; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; @@ -22,9 +22,9 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -@Route("/") +@Route("") @PageTitle("Moderatorenwahl") -@PreserveOnRefresh +@RouteScope @Configuration public class MainView extends VerticalLayout {