Merge branch 'main' into main-public

# Conflicts:
#	messages/en.json
#	messages/zh.json
#	src/components/Footer.tsx
main
tt 9 months ago
commit d5fdcf90fb

@ -1,279 +1,132 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 905.00 869.00">
<path fill="#e4a749" d="
M 83.63 0.00
L 86.50 0.00
Q 99.14 1.41 111.21 4.98
C 116.84 6.65 122.32 9.25 127.39 12.28
C 139.54 19.53 147.50 30.17 153.63 43.18
Q 160.69 58.17 161.35 74.32
Q 161.85 86.31 161.90 96.02
Q 162.12 134.27 161.98 177.62
C 161.97 179.50 162.39 181.12 162.60 182.95
C 162.50 185.05 162.01 187.03 162.01 189.03
Q 162.02 422.01 162.00 655.00
Q 161.99 664.74 160.57 672.74
Q 157.62 670.22 155.15 667.95
Q 152.39 665.41 149.69 663.14
Q 134.09 650.04 122.26 638.09
C 108.60 624.30 96.20 606.86 84.79 589.82
Q 74.39 574.29 65.38 559.57
C 64.61 558.32 64.14 556.81 63.18 555.74
C 61.87 554.25 61.43 552.37 60.23 550.78
Q 59.43 549.73 58.73 548.38
Q 57.92 546.80 56.96 545.44
Q 55.35 543.15 53.56 538.98
C 53.48 538.79 53.24 538.58 53.04 538.50
Q 52.69 538.37 52.52 538.03
C 49.62 532.15 46.24 526.13 43.79 519.97
Q 42.54 516.81 40.89 513.67
C 39.48 510.99 38.56 508.12 37.21 505.34
Q 35.74 502.30 34.41 499.07
Q 25.43 477.33 19.04 453.48
Q 13.85 434.15 12.74 428.60
Q 7.89 404.54 5.63 379.76
Q 3.19 353.05 2.55 326.25
Q 2.05 305.12 1.75 284.00
Q 0.99 230.37 0.41 176.83
Q 1.31 166.62 0.38 156.44
Q 0.96 116.47 1.44 76.46
Q 1.54 68.28 2.53 63.12
C 4.17 54.63 8.10 46.15 12.54 38.23
A 23.26 22.78 80.8 0 1 15.22 34.43
C 21.77 26.88 27.88 19.49 36.12 13.88
Q 39.17 11.81 42.57 10.54
C 45.64 9.40 48.35 7.76 51.53 6.63
Q 58.73 4.06 66.24 2.66
Q 74.90 1.03 83.63 0.00
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0.00 0.00 518.00 518.00">
<path fill="#ffa11b" d="
M 93.77 122.28
Q 93.91 128.16 93.90 134.00
Q 93.75 209.75 93.93 285.50
Q 94.12 363.34 93.69 394.25
Q 93.67 395.41 92.47 398.11
Q 83.11 390.32 76.91 384.59
Q 65.63 374.17 56.55 361.14
C 47.11 347.58 37.53 333.54 30.05 318.94
Q 10.06 279.90 5.51 238.25
Q 3.72 221.89 3.13 196.80
Q 2.64 176.01 2.48 154.06
C 2.36 136.67 1.90 119.37 2.09 101.74
Q 2.24 88.52 2.33 74.96
Q 2.43 60.60 3.35 55.07
Q 5.59 41.51 16.60 31.12
C 18.61 29.22 20.72 27.09 23.11 25.76
Q 29.35 22.30 35.96 20.75
Q 39.99 19.80 44.41 19.07
Q 49.42 18.24 53.36 18.71
C 64.05 19.98 76.10 24.43 82.58 32.89
Q 93.29 46.90 93.37 64.92
Q 93.49 93.61 93.77 122.28
Z"
/>
<path fill="#e4a749" d="
M 818.37 0.00
L 821.75 0.00
Q 826.16 0.63 830.58 1.21
Q 831.79 1.37 832.88 1.70
C 834.74 2.26 836.74 2.15 838.74 2.65
Q 842.49 3.57 846.66 4.63
Q 851.19 5.77 854.44 7.09
Q 862.46 10.34 869.79 14.98
C 871.08 15.80 871.92 17.02 873.17 17.66
Q 874.72 18.45 875.90 19.67
Q 880.62 24.57 885.95 29.67
Q 891.21 34.70 894.90 40.52
Q 903.36 53.85 905.00 69.86
L 905.00 354.25
Q 904.56 359.48 904.56 364.75
Q 904.56 365.36 904.25 365.87
Q 903.98 366.30 904.00 366.81
Q 904.18 375.17 903.39 381.01
Q 903.04 383.63 902.98 385.30
Q 902.95 386.45 902.81 387.72
Q 896.99 441.42 878.46 492.23
C 874.45 503.23 869.20 513.70 864.04 524.22
Q 855.65 541.32 844.66 557.90
Q 827.53 583.74 799.80 619.05
Q 795.88 624.05 791.49 628.97
C 790.98 629.55 790.80 630.37 790.32 630.85
Q 779.01 642.19 767.75 653.45
C 767.19 654.01 766.40 653.85 765.78 654.46
C 763.11 657.09 760.58 659.93 757.53 662.12
Q 756.02 663.21 754.65 664.47
Q 753.04 665.96 750.44 668.04
Q 746.71 671.03 743.19 676.23
Q 742.85 609.78 742.99 544.47
Q 743.00 540.40 743.24 536.54
C 743.63 529.99 743.01 523.28 743.01 516.93
Q 742.94 272.94 743.02 179.75
Q 743.02 177.40 742.12 175.99
Q 742.36 174.63 742.67 173.32
Q 742.98 171.99 742.98 170.73
C 742.93 150.40 742.67 130.02 743.51 109.76
Q 743.53 109.34 743.80 109.01
A 0.90 0.87 -25.7 0 0 744.01 108.44
Q 743.96 97.93 744.08 87.25
Q 744.17 79.70 744.76 71.97
Q 745.57 61.49 748.79 50.90
Q 751.97 40.40 757.17 33.14
Q 763.01 24.99 772.36 16.49
Q 783.20 6.63 797.76 3.52
Q 806.81 1.59 818.37 0.00
<path fill="#ffa11b" d="
M 422.44 399.92
Q 421.94 385.22 421.95 362.25
Q 421.96 247.22 421.98 132.18
C 421.98 127.70 422.28 122.37 422.28 117.47
Q 422.63 88.72 423.62 60.00
Q 424.15 44.82 432.82 34.14
Q 435.49 30.87 440.27 26.64
Q 441.89 25.20 443.51 24.50
C 444.81 23.93 445.83 23.00 447.08 22.52
Q 453.84 19.88 461.93 18.89
Q 467.66 18.18 473.37 19.22
C 481.47 20.70 489.29 23.05 495.69 28.03
Q 500.56 31.82 505.34 37.32
Q 511.72 44.66 513.31 53.39
Q 514.27 58.61 514.27 65.75
Q 514.26 134.33 514.25 202.92
C 514.25 209.35 513.96 215.96 513.78 222.43
Q 513.65 226.72 513.40 230.15
Q 510.64 267.80 496.48 302.60
Q 493.62 309.62 487.87 320.19
Q 483.44 328.31 477.74 336.73
Q 466.89 352.75 454.63 367.99
Q 446.42 378.20 435.44 388.50
C 433.40 390.41 431.14 391.84 429.20 393.81
Q 426.21 396.86 422.44 399.92
Z"
/>
<path fill="#cb6439" d="
M 742.12 175.99
Q 743.02 177.40 743.02 179.75
Q 742.94 272.94 743.01 516.93
C 743.01 523.28 743.63 529.99 743.24 536.54
Q 743.00 540.40 742.99 544.47
Q 742.85 609.78 743.19 676.23
Q 740.44 683.54 735.15 692.12
Q 732.95 695.69 731.40 699.21
Q 725.37 712.94 716.74 725.30
C 708.33 737.36 699.12 749.27 689.38 760.63
Q 686.77 763.67 683.75 766.61
C 682.99 767.35 682.84 768.24 682.06 769.04
Q 672.57 778.75 661.67 789.49
C 661.14 790.02 660.40 789.88 659.79 790.46
C 657.44 792.76 655.21 795.07 652.60 797.12
Q 630.68 814.36 607.26 828.66
Q 599.20 833.58 587.85 838.89
Q 576.30 844.29 564.94 849.23
C 558.79 851.91 552.02 854.07 545.48 856.21
Q 538.82 858.38 530.93 860.34
Q 524.46 861.95 517.99 863.55
Q 513.39 864.68 508.92 865.30
Q 504.22 865.96 499.74 866.53
Q 495.21 867.11 490.71 867.02
Q 490.27 867.02 489.91 867.28
Q 489.68 867.44 489.40 867.47
Q 482.33 868.09 474.84 868.01
Q 474.31 868.00 473.85 868.27
Q 473.46 868.51 473.00 868.51
Q 468.91 868.58 464.88 869.00
L 459.00 869.00
Q 455.02 868.57 451.00 868.55
Q 450.53 868.55 450.14 868.29
Q 449.68 867.99 449.13 868.00
Q 442.56 868.13 435.75 867.48
C 435.10 867.42 434.62 866.95 433.98 866.97
Q 428.56 867.17 423.69 866.36
Q 421.99 866.09 420.33 866.03
Q 418.29 865.97 416.49 865.67
Q 394.07 861.92 382.72 858.51
Q 369.11 854.42 356.16 849.28
Q 335.39 841.03 316.76 832.28
Q 302.29 825.48 291.25 818.96
C 276.60 810.30 263.11 801.17 249.29 790.19
Q 248.01 789.17 246.82 787.97
Q 245.47 786.62 243.98 785.61
C 241.25 783.74 239.43 781.05 236.81 779.36
Q 235.09 778.25 233.68 776.86
Q 222.32 765.57 209.74 752.92
C 209.14 752.31 209.15 751.71 208.57 751.09
Q 205.36 747.57 202.55 744.41
Q 202.08 743.89 201.64 743.34
Q 196.59 737.20 192.41 731.29
Q 184.55 720.17 177.50 708.17
Q 175.13 704.15 172.74 698.88
Q 166.74 685.69 160.57 672.74
Q 161.99 664.74 162.00 655.00
Q 162.02 422.01 162.01 189.03
C 162.01 187.03 162.50 185.05 162.60 182.95
Q 162.73 183.79 162.79 184.65
Q 162.80 184.75 162.89 184.75
Q 162.92 184.76 162.95 184.76
Q 163.01 184.77 163.01 184.70
Q 163.76 176.44 167.81 169.00
Q 174.09 157.45 183.51 148.01
Q 188.64 142.87 195.65 139.17
C 203.79 134.87 212.06 130.73 220.70 130.05
C 223.54 129.83 226.27 129.10 229.15 129.05
Q 230.73 129.02 232.25 128.70
Q 237.82 127.50 244.02 128.49
C 244.86 128.62 245.36 129.14 246.25 129.02
Q 246.81 128.95 247.35 129.04
Q 251.51 129.77 255.77 130.45
Q 259.88 131.11 264.15 133.16
Q 274.36 138.07 281.86 144.76
Q 283.89 146.57 285.91 148.38
Q 288.03 150.30 289.80 152.30
C 292.51 155.38 295.08 157.91 297.12 161.53
Q 304.57 174.70 308.13 187.74
Q 309.29 192.01 308.91 197.31
A 0.86 0.85 25.0 0 0 309.16 197.98
Q 309.43 198.25 309.45 198.62
Q 310.13 208.01 309.99 217.36
C 309.98 218.37 310.42 218.99 310.47 219.91
Q 311.15 230.46 310.99 241.21
Q 310.98 241.70 311.27 242.10
Q 311.44 242.34 311.44 242.64
Q 312.18 405.40 311.97 573.88
Q 311.97 574.44 312.20 574.95
Q 312.40 575.38 312.42 575.86
Q 312.99 587.97 312.99 600.12
C 312.99 605.68 313.70 611.15 314.27 616.74
Q 315.58 629.57 319.01 642.95
C 322.35 656.01 328.78 667.82 336.40 678.77
C 337.53 680.39 338.92 681.61 339.96 683.26
Q 341.52 685.74 344.18 687.89
Q 344.85 688.43 344.98 689.27
Q 345.06 689.83 345.47 690.23
Q 350.40 695.10 355.87 700.74
Q 359.87 704.87 364.74 708.31
C 369.15 711.41 373.47 714.63 378.17 717.16
Q 401.61 729.83 425.05 735.91
Q 432.15 737.75 440.52 737.96
C 455.58 738.35 469.64 738.13 483.85 734.02
Q 498.17 729.89 510.41 723.73
Q 516.67 720.58 524.12 715.11
C 534.51 707.49 545.44 699.31 553.49 690.05
C 572.49 668.18 586.26 639.44 588.88 610.09
Q 589.99 597.55 589.99 585.50
Q 589.90 366.84 590.55 207.76
Q 590.55 206.79 590.87 205.87
Q 591.01 205.46 591.00 205.05
Q 590.69 192.27 593.62 180.38
Q 595.57 172.44 598.34 165.69
C 602.91 154.55 611.21 144.59 620.19 136.85
Q 628.49 129.70 639.80 127.32
Q 654.39 124.26 673.34 125.46
Q 673.65 125.48 673.89 125.70
Q 674.27 126.06 674.80 126.03
Q 678.84 125.83 682.38 126.45
Q 689.36 127.69 697.09 130.80
Q 704.82 133.93 711.24 138.77
C 711.71 139.12 712.31 139.16 712.71 139.56
Q 721.26 148.00 730.02 156.82
Q 731.30 158.10 732.22 159.63
Q 733.33 161.47 735.13 162.87
Q 735.83 163.41 735.96 164.28
Q 736.04 164.75 736.38 165.10
Q 740.79 169.63 742.12 175.99
<path fill="#f05011" d="
M 422.28 117.47
C 422.28 122.37 421.98 127.70 421.98 132.18
Q 421.96 247.22 421.95 362.25
Q 421.94 385.22 422.44 399.92
Q 417.12 412.81 411.35 422.06
Q 401.63 437.62 386.67 454.01
Q 379.95 461.37 372.46 467.50
Q 353.71 482.83 332.70 493.10
C 314.36 502.07 293.58 508.04 273.02 509.01
Q 252.19 509.98 231.00 506.33
Q 221.83 504.75 211.52 501.08
Q 188.77 492.98 171.08 483.32
Q 149.14 471.33 130.62 453.86
Q 113.06 437.30 101.40 416.58
Q 98.91 412.15 92.47 398.11
Q 93.67 395.41 93.69 394.25
Q 94.12 363.34 93.93 285.50
Q 93.75 209.75 93.90 134.00
Q 93.91 128.16 93.77 122.28
Q 97.53 109.64 105.94 101.93
Q 114.31 94.26 123.77 92.47
Q 133.26 90.68 138.60 90.90
Q 142.88 91.08 148.64 92.56
Q 149.71 92.83 150.68 93.36
C 157.97 97.37 163.64 101.46 168.97 108.26
Q 171.59 111.61 174.51 119.33
Q 176.38 124.26 176.90 131.35
Q 177.85 144.39 177.95 157.60
Q 178.60 247.98 178.25 322.13
C 178.19 335.00 178.73 347.95 179.35 361.23
C 180.06 376.32 183.94 390.88 193.42 403.34
Q 198.64 410.19 205.22 415.98
C 213.67 423.40 224.66 428.62 235.35 432.12
Q 243.49 434.79 252.12 435.35
Q 272.89 436.72 291.19 426.90
C 297.46 423.54 304.27 418.87 309.36 413.98
Q 330.21 393.94 334.60 366.79
Q 335.81 359.28 335.79 346.89
Q 335.67 246.70 336.14 135.83
Q 336.19 125.11 339.86 114.54
Q 341.77 109.02 345.44 104.06
Q 349.31 98.82 353.25 95.68
Q 359.04 91.07 368.13 89.54
C 381.31 87.32 397.91 89.98 408.01 99.81
Q 414.34 105.98 419.23 112.22
C 420.51 113.85 421.23 115.69 422.28 117.47
Z"
/>
<path fill="#e4a749" d="
M 384.90 194.51
Q 385.26 185.84 388.24 178.02
C 391.22 170.19 397.82 163.61 404.01 157.65
Q 413.30 148.69 423.69 145.00
Q 430.00 142.75 437.61 141.52
Q 448.29 139.78 458.53 141.53
Q 464.22 142.51 470.38 144.41
C 482.08 148.04 493.22 154.16 501.51 163.28
C 509.43 172.00 516.03 183.48 516.03 195.28
Q 516.03 195.70 516.22 196.08
Q 516.41 196.48 516.45 196.89
Q 517.17 205.13 516.96 213.24
Q 516.95 213.70 517.25 214.04
Q 517.43 214.25 517.44 214.51
Q 518.16 241.17 517.98 267.91
C 517.98 268.74 518.44 269.25 518.46 270.09
Q 519.17 307.33 518.97 343.20
Q 518.97 343.67 519.21 344.08
Q 519.46 344.51 519.47 345.01
Q 519.77 367.66 519.86 391.50
Q 520.23 478.91 519.91 591.00
Q 519.88 599.24 517.73 607.31
C 514.62 618.99 509.51 631.40 502.45 640.36
Q 499.88 643.61 495.56 647.30
Q 491.72 650.58 488.06 653.39
Q 477.11 661.77 459.85 664.14
Q 452.57 665.14 445.66 664.82
Q 438.90 664.51 432.41 663.41
C 423.26 661.85 414.78 659.06 407.62 652.70
Q 402.00 647.71 397.84 642.75
C 393.38 637.44 389.96 630.72 388.27 623.64
Q 384.90 609.54 384.95 595.58
Q 384.95 595.25 384.78 594.94
Q 384.69 594.78 384.60 594.61
Q 384.52 594.46 384.52 594.29
Q 384.12 584.55 384.11 576.55
Q 383.85 393.43 384.08 215.88
Q 384.10 206.65 384.56 195.75
Q 384.57 195.49 384.70 195.26
Q 384.88 194.91 384.90 194.51
<path fill="#ffa11b" d="
M 290.13 116.78
C 292.96 121.61 293.55 125.93 294.19 131.20
Q 294.57 134.31 294.61 137.38
C 295.25 187.72 295.13 237.85 294.93 287.00
Q 294.81 315.19 293.64 345.03
Q 293.11 358.55 291.25 369.35
C 290.60 373.11 288.94 376.86 286.23 379.98
C 279.91 387.24 272.35 392.14 262.57 393.40
Q 252.99 394.63 242.91 392.20
Q 241.43 391.84 238.27 390.54
Q 236.07 389.63 234.01 388.16
Q 224.44 381.32 221.61 370.00
Q 220.15 364.15 219.66 355.36
Q 219.25 347.84 219.25 340.38
Q 219.23 236.91 219.26 134.24
C 219.26 129.71 219.93 124.79 221.30 120.55
Q 223.84 112.74 232.17 106.04
Q 235.79 103.13 238.63 102.10
Q 243.46 100.36 249.35 99.27
Q 254.95 98.24 259.99 98.56
C 267.79 99.07 276.22 102.72 282.33 107.47
Q 286.65 110.83 290.13 116.78
Z"
/>
</svg>

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -44,7 +44,7 @@ export default async function LocaleLayout({
{/* }}*/}
{/* />*/}
{/*</head>*/}
<body suppressHydrationWarning={true} className={clsx(inter.className, 'flex h-full flex-col')}>
<body suppressHydrationWarning={true} className={clsx(inter.className, 'flex h-full flex-col bg-[#020d24]')}>
<CommonProvider>
{children}
</CommonProvider>

@ -0,0 +1,55 @@
import Header from '~/components/Header';
import Footer from '~/components/Footer';
import HeadInfo from "~/components/HeadInfo";
const PageComponent = ({
locale='',
data,
dataIndex,
}) => {
return (
<>
<HeadInfo
title={data('title')}
description={data('mainDescription')}
locale={locale}
page={"/privacy-policy"}
/>
<Header
locale={locale}
page={'privacy-policy'}
/>
<main className="w-[95%] md:w-[65%] lg:w-[55%] 2xl:w-[45%] mx-auto h-full my-8">
<div className="p-6 prose mx-auto text-gray-300">
<h1 className="text-3xl font-extrabold pb-6 text-white">
{data('h1')}
</h1>
<p>{data('date')}</p>
<p>{data('desc')}</p>
<h4 className={"text-white font-bold"}>{data('h4_1')}</h4>
<p>{data('h4_1_pa')}</p>
<p>{data('h4_1_pb')}</p>
<h4 className={"text-white font-bold"}>{data('h4_2')}</h4>
<p>{data('h4_2_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_3')}</h4>
<p>{data('h4_3_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_4')}</h4>
<p>{data('h4_4_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_5')}</h4>
<p>{data('h4_5_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_6')}</h4>
<p>
{data('h4_6_p')}{" "}<a href="mailto:hello@sorawebui.com" className={"text-white"}>hello@sorawebui.com</a>.
</p>
</div>
</main>
<Footer
locale={locale}
description={dataIndex('description')}
/>
</>
)
}
export default PageComponent

@ -0,0 +1,20 @@
import {getTranslations, unstable_setRequestLocale} from 'next-intl/server';
import PageComponent from './PageComponent';
export default async function PageContent({params: {locale=''}}) {
// Enable static rendering
unstable_setRequestLocale(locale);
const t = await getTranslations('privacyPolicy');
const tIndex = await getTranslations('IndexPage');
return (
<PageComponent
locale={locale}
data={t}
dataIndex={tIndex}
>
</PageComponent>
)
}

@ -0,0 +1,63 @@
import Header from '~/components/Header';
import Footer from '~/components/Footer';
import HeadInfo from "~/components/HeadInfo";
const PageComponent = ({
locale = '',
data,
dataIndex
}) => {
return (
<>
<HeadInfo
title={data('title')}
description={data('mainDescription')}
locale={locale}
page={"/terms-of-service"}
/>
<Header
locale={locale}
page={'terms-of-service'}
/>
<main className="w-[95%] md:w-[65%] lg:w-[55%] 2xl:w-[45%] mx-auto h-full my-8">
<div className="p-6 prose mx-auto my-auto text-gray-300">
<h1 className="text-3xl font-extrabold pb-6 text-white">
{data('h1')}
</h1>
<p>{data('date')}</p>
<p>{data('desc')}</p>
<h4 className={"text-white font-bold"}>{data('h4_1')}</h4>
<p>{data('h4_1_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_2')}</h4>
<p>{data('h4_2_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_3')}</h4>
<p>{data('h4_3_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_4')}</h4>
<p>{data('h4_4_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_5')}</h4>
<p>
{data('h4_5_p')}<a
href={`https://whooper.ai/${locale}/privacy-policy`}
className={"text-white"}>https://sorawebui.com/privacy-policy</a>
</p>
<h4 className={"text-white font-bold"}>{data('h4_6')}</h4>
<p>{data('h4_6_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_7')}</h4>
<p>{data('h4_7_p')}</p>
<h4 className={"text-white font-bold"}>{data('h4_8')}</h4>
<p>
{data('h4_8_p')}<a href="mailto:hello@sorawebui.com" className={"text-white"}>hello@sorawebui.com</a>.
</p>
</div>
</main>
<Footer
locale={locale}
description={dataIndex('description')}
/>
</>
)
}
export default PageComponent

@ -0,0 +1,22 @@
import {getTranslations, unstable_setRequestLocale} from 'next-intl/server';
import PageComponent from './PageComponent';
export default async function PageContent({params: {locale=''}}) {
// Enable static rendering
unstable_setRequestLocale(locale);
const t = await getTranslations('termsOfService');
const tIndex = await getTranslations('IndexPage');
return (
<PageComponent
locale={locale}
data={t}
dataIndex={tIndex}
>
</PageComponent>
)
}

@ -0,0 +1,44 @@
import {languageList} from "~/configs/supportLanguage";
const HeadInfo = ({
title= "",
description= "",
page="",
locale = "en"
}) => {
return (
<>
<title>{title}</title>
<meta name="description" content={description}/>
{
languageList.map((item) => {
const currentPage = page;
let hrefLang = item.code;
if (item.lang == 'en') {
hrefLang = 'x-default';
}
let href = `${process.env.NEXT_PUBLIC_SITE_URL}/${item.lang}${currentPage}`;
if (item.lang == 'en') {
href = `${process.env.NEXT_PUBLIC_SITE_URL}${currentPage}`;
}
return <link key={href} rel="alternate" hrefLang={hrefLang} href={href}/>
})
}
{
languageList.map((item) => {
const currentPage = page;
let hrefLang = item.code;
let href = `${process.env.NEXT_PUBLIC_SITE_URL}/${item.lang}${currentPage}`;
if (item.lang == 'en') {
href = `${process.env.NEXT_PUBLIC_SITE_URL}${currentPage}`;
}
if (locale == item.lang) {
return <link key={href + 'canonical'} rel="canonical" hrefLang={hrefLang} href={href}/>
}
})
}
</>
)
}
export default HeadInfo

@ -84,6 +84,9 @@ export default function Header({
{
languages.map((item) => {
let hrefValue = `/${item.lang}`;
if (page) {
hrefValue = `/${item.lang}/${page}`;
}
return (
<Menu.Item key={item.lang}>
<Link href={hrefValue} onClick={() => checkLocalAndLoading(item.lang)}>

@ -0,0 +1,21 @@
export const languageList = [
{
code: "en-US",
lang: "en",
language: "English",
},
{
code: "zh-CN",
lang: "zh",
language: "简体中文",
}
]
export const getLanguageByLang = (lang) => {
for (let i = 0; i < languageList.length; i++) {
if (lang == languageList[i].lang) {
return languageList[i];
}
}
}
Loading…
Cancel
Save