mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-06-24 05:36:39 -05:00
16 lines
461 B
TypeScript
16 lines
461 B
TypeScript
import type { LoaderFunctionArgs } from "react-router";
|
|
import { getUser } from "~/features/auth/core/user.server";
|
|
import * as MatchProfileRepository from "~/features/match-profile/MatchProfileRepository.server";
|
|
|
|
export const loader = async (_args: LoaderFunctionArgs) => {
|
|
const user = getUser();
|
|
|
|
if (!user) {
|
|
return { matchProfile: null };
|
|
}
|
|
|
|
const matchProfile = await MatchProfileRepository.settingsByUserId(user.id);
|
|
|
|
return { matchProfile };
|
|
};
|