mirror of
https://github.com/fergalmoran/supanextail.git
synced 2025-12-22 09:17:54 +00:00
Fix null profile for new users
This commit is contained in:
@@ -25,9 +25,9 @@ type DashboardProps = {
|
|||||||
const Dashboard = ({ profile, session, planName }: DashboardProps): JSX.Element => {
|
const Dashboard = ({ profile, session, planName }: DashboardProps): JSX.Element => {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [username, setUsername] = useState(profile.username);
|
const [username, setUsername] = useState(profile?.username || '');
|
||||||
const [website, setWebsite] = useState(profile.website);
|
const [website, setWebsite] = useState(profile?.website || '');
|
||||||
const [avatar_url, setAvatarUrl] = useState(profile.avatar_url);
|
const [avatar_url, setAvatarUrl] = useState(profile?.avatar_url || '');
|
||||||
const [payment, setPayment] = useState(false);
|
const [payment, setPayment] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user