Improved the overall stability and speed of the app
This commit is contained in:
@@ -22,6 +22,7 @@ import WritingGeneration from "./(generation)/WritingGeneration";
|
||||
import LevelGeneration from "./(generation)/LevelGeneration";
|
||||
import SpeakingGeneration from "./(generation)/SpeakingGeneration";
|
||||
import {checkAccess} from "@/utils/permissions";
|
||||
import {User} from "@/interfaces/user";
|
||||
|
||||
export const getServerSideProps = withIronSessionSsr(({req, res}) => {
|
||||
const user = req.session.user;
|
||||
@@ -49,10 +50,12 @@ export const getServerSideProps = withIronSessionSsr(({req, res}) => {
|
||||
};
|
||||
}, sessionOptions);
|
||||
|
||||
export default function Generation() {
|
||||
const [module, setModule] = useState<Module>("reading");
|
||||
interface Props {
|
||||
user: User;
|
||||
}
|
||||
|
||||
const {user} = useUser({redirectTo: "/login"});
|
||||
export default function Generation({user}: Props) {
|
||||
const [module, setModule] = useState<Module>("reading");
|
||||
|
||||
const [title, setTitle] = useState<string>("");
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user