Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions public/profile/Background.svg

This file was deleted.

Binary file removed public/user/registered-prepare/Background.png
Binary file not shown.
9 changes: 0 additions & 9 deletions public/user/registered-prepare/Background.svg

This file was deleted.

30 changes: 0 additions & 30 deletions public/user/registered-prepare/Logo.svg

This file was deleted.

11 changes: 9 additions & 2 deletions src/components/profile/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
'use client';

import Image from 'next/image';
import { getImageURL } from '@/utils/image';
import { useAuth } from '@/contexts/auth';

export default function header() {
const username = 'Yang';
export default function Header() {
const { user } = useAuth();
let username = user?.name;
if (username) {
username = username.split(' ')[0];
}

return (
<div className="relative mx-auto items-center justify-center">
Expand Down
16 changes: 11 additions & 5 deletions src/components/profile/Ticket/Information.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
export default function Inf() {
const ID = '0123456789';
const fname = 'พงษ์บุริศร์ ว่องไชยกุล';
'use client';
import { useLiff } from '@/contexts/liff';
import { useAuth } from '@/contexts/auth';

export default function Inf() {
const { client } = useLiff();
const context = client?.getContext();
const userId = context?.userId || '';
const { user } = useAuth();
const username = user?.name;
return (
<div className="flex flex-col items-center justify-center text-[12px] text-white">
<p>
#UID<span>{ID}</span>
#UID<span>{userId}</span>
</p>
<p>
<span>{fname}</span>
<span>{username}</span>
</p>
<div className="mt-[5px] h-[1px] w-[245px] bg-white" />
<div className="mt-3 flex flex-col items-center">
Expand Down
8 changes: 7 additions & 1 deletion src/components/profile/Ticket/Qrcode.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
'use client';

import React from 'react';
import QRCode from 'react-qr-code';
import Image from 'next/image';
import { getImageURL } from '@/utils/image';
import { useLiff } from '@/contexts/liff';

export default function QR() {
const { client } = useLiff();
const context = client?.getContext();
const userId = context?.userId || '';
return (
<div>
<div className="flex justify-center gap-2">
Expand All @@ -16,7 +22,7 @@ export default function QR() {
<h2 className="text-center text-white">Your QR-Code</h2>
</div>
<div className="mt-4">
<QRCode value={'UID'} className="bg-white p-4" />
<QRCode value={userId} className="bg-white p-4" />
</div>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/profile/Ticket/Ticket.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Ticket() {
<Inf />
<InfButton />
</div>
<div className="mt-20">
<div className="mt-24">
<EditButton />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/registered-prepare/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function header() {
<div className="relative flex flex-col pt-14">
<div>
<Image
src={getImageURL('/user/registered-prepare/Logo.svg')}
src={getImageURL('/profile/Logo.svg')}
className="mx-auto"
width={60}
height={70}
Expand Down
Loading