website refactor
This commit is contained in:
@@ -4,7 +4,8 @@ import { updateProfileAction } from './actions';
|
||||
import { ProfilePageClient } from './ProfilePageClient';
|
||||
|
||||
export default async function ProfilePage() {
|
||||
const result = await ProfilePageQuery.execute();
|
||||
const query = new ProfilePageQuery();
|
||||
const result = await query.execute();
|
||||
|
||||
if (result.isErr()) {
|
||||
notFound();
|
||||
@@ -13,5 +14,11 @@ export default async function ProfilePage() {
|
||||
const viewData = result.unwrap();
|
||||
const mode = viewData.driver.id ? 'profile-exists' : 'needs-profile';
|
||||
|
||||
return <ProfilePageClient viewData={viewData} mode={mode} onSaveSettings={updateProfileAction} />;
|
||||
return (
|
||||
<ProfilePageClient
|
||||
viewData={viewData}
|
||||
mode={mode}
|
||||
onSaveSettings={updateProfileAction}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user