Skip to content

Commit

Permalink
Merge pull request #45 from acayseth/develop
Browse files Browse the repository at this point in the history
fix day-of-weeks.component.tsx
  • Loading branch information
acayseth committed Sep 10, 2023
2 parents 11e9759 + fe752cf commit 87df567
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 16 deletions.
3 changes: 2 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
appDir: true
appDir: true,
serverActions: true
},
generateEtags: true,
swcMinify: true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"clean": "rimraf .next node_modules && yarn cache clean && yarn install"
},
"dependencies": {
"@headlessui/react": "^1.7.17",
"axios": "^1.4.0",
"clsx": "^1.2.1",
"copy-to-clipboard": "^3.3.3",
Expand Down
2 changes: 0 additions & 2 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ export default async function () {
const { fetchGiphy } = userHelperHook();
const giphy = await fetchGiphy({});

console.log(giphy, 'gp')

const jsonLd: WithContext<Product> = {
'@context': 'https://schema.org',
'@type': 'Product',
Expand Down
4 changes: 2 additions & 2 deletions src/components/ui/day-of-week/day-of-weeks.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export default function DayOfWeeksComponent() {
{ id: 4, name: 'Jo' },
{ id: 5, name: 'Vi' },
{ id: 6, name: 'Sî' },
{ id: 7, name: 'Du' },
{ id: 0, name: 'Du' },
];

return (
<section className="flex justify-center align-middle items-center py-0.5 my-2">
<div className="px-5">
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/giphy/giphy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function GiphyComponent({ giphy }: IProps) {
<div className="relative m-4 h-[300px] md:h-[400px] object-scale-down overflow-hidden rounded-xl">
<MediaContentComponent giphy={giphy} type={'mp4'} />
</div>
<div className="px-4 pb-4 flex flex-row justify-between items-center">
<div className="px-2 pb-2 flex flex-row justify-between items-center">
<MediaControlComponent giphyId={giphy.data.id} />
</div>
</section>
Expand Down
22 changes: 13 additions & 9 deletions src/components/ui/media/media-control.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import clsx from 'clsx';
import React from 'react';
import { HiMiniArrowUturnRight } from 'react-icons/hi2';

import { useHelperHook } from '@/_libs/clients/helper.hook';

Expand All @@ -12,28 +13,31 @@ interface IProps {
export default function MediaControlComponent({ giphyId }: IProps) {
const { copy2Clipboard, refreshPage } = useHelperHook();
return (
<>
<div className="grid grid-cols-2 gap-4 w-full">
<button
type="button"
aria-label="Compie Link"
className={clsx(
'select-none rounded-md bg-white hover:bg-gray-100/80 w-1/2 py-3 px-6 text-center align-middle font-sans text-md font-bold text-black transition-all',
'rounded-md bg-white hover:bg-gray-100/80 py-3 px-6 font-sans text-md font-bold text-black',
'focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none',
)}
onClick={() => copy2Clipboard(giphyId)}
>Copy gif link</button>

<div className="px-2"></div>
>
<span>Copy gif link</span>
</button>

<button
type="button"
aria-label="Alta gifca"
className={clsx(
'select-none rounded-md bg-white hover:bg-gray-100/80 w-1/2 py-3 px-6 text-center align-middle font-sans text-md font-bold text-black transition-all',
'rounded-md bg-white hover:bg-gray-100/80 py-3 px-6 font-sans text-md font-bold text-black',
'focus:opacity-[0.85] focus:shadow-none active:opacity-[0.85] active:shadow-none disabled:pointer-events-none disabled:opacity-50 disabled:shadow-none',
'ring-1 ring-black'
)}
onClick={() => refreshPage(giphyId)}
>Altă gif-că</button>
</>
>
<span>Altă gif-că</span>
</button>
</div>
);
}
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
resolved "https://registry.yarnpkg.com/@alloc/quick-lru/-/quick-lru-5.2.0.tgz#7bf68b20c0a350f936915fcae06f58e32007ce30"
integrity sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==

"@headlessui/react@^1.7.17":
version "1.7.17"
resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.7.17.tgz#a0ec23af21b527c030967245fd99776aa7352bc6"
integrity sha512-4am+tzvkqDSSgiwrsEpGWqgGo9dz8qU5M3znCkC4PgkpY4HcCZzEDEvozltGGGHIKl9jbXbZPSH5TWn4sWJdow==
dependencies:
client-only "^0.0.1"

"@isaacs/cliui@^8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550"
Expand Down Expand Up @@ -346,7 +353,7 @@ chownr@^1.1.1:
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b"
integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==

client-only@0.0.1:
client-only@0.0.1, client-only@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/client-only/-/client-only-0.0.1.tgz#38bba5d403c41ab150bff64a95c85013cf73bca1"
integrity sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==
Expand Down

0 comments on commit 87df567

Please sign in to comment.