@oxyhq/services 0.0.76 → 0.0.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/package.json +3 -3
  2. package/dist/assets/dot-icon.tsx +0 -11
  3. package/dist/assets/verified-icon.tsx +0 -19
  4. package/dist/components/assets/oxy-logo.tsx +0 -97
  5. package/dist/components/auth/AccountSwitcherModal.tsx +0 -139
  6. package/dist/components/auth/SessionOwnerButton.tsx +0 -67
  7. package/dist/components/auth/SignInButton.tsx +0 -31
  8. package/dist/components/auth/styles/oavatar.module.css +0 -34
  9. package/dist/components/auth/styles/oavatar.module.css.map +0 -1
  10. package/dist/components/auth/styles/oavatar.module.scss +0 -36
  11. package/dist/components/auth/styles/sign-in-button.module.css +0 -30
  12. package/dist/components/auth/styles/sign-in-button.module.css.map +0 -1
  13. package/dist/components/auth/styles/sign-in-button.module.scss +0 -32
  14. package/dist/components/elements/button/components/button.tsx +0 -35
  15. package/dist/components/elements/button/components/styles/button.module.css +0 -25
  16. package/dist/components/elements/button/components/styles/button.module.css.map +0 -1
  17. package/dist/components/elements/button/components/styles/button.module.scss +0 -27
  18. package/dist/components/elements/button/index.ts +0 -1
  19. package/dist/components/elements/ellipsis-wrapper/components/EllipsisWrapper.tsx +0 -18
  20. package/dist/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.css +0 -11
  21. package/dist/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.css.map +0 -1
  22. package/dist/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.scss +0 -10
  23. package/dist/components/elements/ellipsis-wrapper/index.ts +0 -1
  24. package/dist/components/elements/modal/components/confirmation-modal.tsx +0 -62
  25. package/dist/components/elements/modal/components/modal.tsx +0 -182
  26. package/dist/components/elements/modal/components/styles/confirmation-modal.module.css +0 -105
  27. package/dist/components/elements/modal/components/styles/confirmation-modal.module.css.map +0 -1
  28. package/dist/components/elements/modal/components/styles/confirmation-modal.module.scss +0 -125
  29. package/dist/components/elements/modal/components/styles/modal.module.css +0 -10
  30. package/dist/components/elements/modal/components/styles/modal.module.css.map +0 -1
  31. package/dist/components/elements/modal/components/styles/modal.module.scss +0 -8
  32. package/dist/components/elements/modal/hooks/use-track-position.ts +0 -49
  33. package/dist/components/elements/modal/index.ts +0 -3
  34. package/dist/config/index.ts +0 -17
  35. package/dist/features/profile/components/avatar.tsx +0 -30
  36. package/dist/features/profile/components/styles/avatar.module.css +0 -15
  37. package/dist/features/profile/components/styles/avatar.module.css.map +0 -1
  38. package/dist/features/profile/components/styles/avatar.module.scss +0 -14
  39. package/dist/features/profile/components/styles/user-name.module.css +0 -18
  40. package/dist/features/profile/components/styles/user-name.module.css.map +0 -1
  41. package/dist/features/profile/components/styles/user-name.module.scss +0 -19
  42. package/dist/features/profile/components/styles/user-username.module.css +0 -6
  43. package/dist/features/profile/components/styles/user-username.module.css.map +0 -1
  44. package/dist/features/profile/components/styles/user-username.module.scss +0 -4
  45. package/dist/features/profile/components/user-name.tsx +0 -21
  46. package/dist/features/profile/components/user-username.tsx +0 -10
  47. package/dist/features/profile/index.ts +0 -3
  48. package/dist/hooks/get-user.ts +0 -30
  49. package/dist/hooks/getUserById.ts +0 -43
  50. package/dist/hooks/use-user.ts +0 -25
  51. package/dist/hooks/useOxySession.ts +0 -104
  52. package/dist/index.css +0 -3
  53. package/dist/index.css.map +0 -1
  54. package/dist/index.ts +0 -13
  55. package/dist/interfaces/index.tsx +0 -22
  56. package/dist/types/index.ts +0 -1
  57. package/dist/utils/cn.ts +0 -6
@@ -1,18 +0,0 @@
1
- import React from "react";
2
- import styles from "./styles/ellipses-wrapper.module.scss";
3
-
4
- export const EllipsisWrapper = ({
5
- children,
6
- }: {
7
- children: React.ReactNode;
8
- }) => {
9
- return (
10
- <div
11
- aria-hidden={true}
12
- role="presentation"
13
- className="grid grid-flow-col [&>*]:truncate"
14
- >
15
- {children}
16
- </div>
17
- );
18
- };
@@ -1,11 +0,0 @@
1
- .container {
2
- display: grid;
3
- grid-auto-flow: column;
4
- }
5
- .container * {
6
- white-space: nowrap;
7
- text-overflow: ellipsis;
8
- overflow: hidden;
9
- }
10
-
11
- /*# sourceMappingURL=ellipses-wrapper.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/ellipsis-wrapper/components/styles/ellipses-wrapper.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;;AAEA;EACE;EACA;EACA","file":"ellipses-wrapper.module.css"}
@@ -1,10 +0,0 @@
1
- .container {
2
- display: grid;
3
- grid-auto-flow: column;
4
-
5
- * {
6
- white-space: nowrap;
7
- text-overflow: ellipsis;
8
- overflow: hidden;
9
- }
10
- }
@@ -1 +0,0 @@
1
- export * from "./components/EllipsisWrapper";
@@ -1,62 +0,0 @@
1
- import React, { useEffect } from "react";
2
- import { motion } from "framer-motion";
3
- import styles from "./styles/confirmation-modal.module.scss";
4
-
5
- export const ConfirmationModal = ({
6
- heading,
7
- paragraph,
8
- confirmButtonText,
9
- confirmButtonClick,
10
- confirmButtonStyle = "delete",
11
- cancelButtonText,
12
- cancelButtonClick,
13
- logo,
14
- }: {
15
- heading: string;
16
- paragraph: string;
17
- confirmButtonText: string;
18
- confirmButtonClick: () => void;
19
- confirmButtonStyle: "delete" | "unfollow" | "logout";
20
- cancelButtonText: string;
21
- cancelButtonClick: () => void;
22
- logo?: React.ReactNode;
23
- }) => {
24
- useEffect(() => {
25
- document.body.style.overflow = "hidden";
26
- document.body.style.paddingRight = "11px";
27
-
28
- return () => {
29
- document.body.style.overflow = "unset";
30
- document.body.style.paddingRight = "0";
31
- };
32
- }, []);
33
-
34
- return (
35
- <motion.div
36
- initial={{ opacity: 0, y: 50 }}
37
- animate={{ opacity: 1, y: 0 }}
38
- exit={{ opacity: 0, y: 50 }}
39
- transition={{ duration: 0.2 }}
40
- className={styles.container}
41
- >
42
- {logo && <div className={styles.logo}>{logo}</div>}
43
- <h1>{heading}</h1>
44
- <p>{paragraph}</p>
45
-
46
- <div className={styles.buttons}>
47
- <button
48
- onClick={confirmButtonClick}
49
- className={`${styles.confirm} ${
50
- styles[confirmButtonStyle as "delete" | "unfollow" | "logout"]
51
- }
52
- }`}
53
- >
54
- {confirmButtonText}
55
- </button>
56
- <button onClick={cancelButtonClick} className={styles.cancel}>
57
- {cancelButtonText}
58
- </button>
59
- </div>
60
- </motion.div>
61
- );
62
- };
@@ -1,182 +0,0 @@
1
- /* eslint-disable jsx-a11y/no-static-element-interactions */
2
- /* eslint-disable jsx-a11y/click-events-have-key-events */
3
- /* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
4
- "use client";
5
- import { motion } from "framer-motion";
6
- import React, { useCallback, useLayoutEffect, useRef } from "react";
7
- import { createPortal } from "react-dom";
8
-
9
- import styles from "./styles/modal.module.scss";
10
-
11
- export const Modal = ({
12
- children,
13
- onClose,
14
- closeOnBackdropClick = true,
15
- background,
16
- minViewportWidth = null,
17
- maxViewportWidth = null,
18
- disableScroll = false,
19
- focusOnElement = null,
20
- focusAfterClose = null,
21
- }: {
22
- children: React.ReactNode;
23
- onClose: () => void;
24
- closeOnBackdropClick?: boolean;
25
- background?: string;
26
- minViewportWidth?: number | null;
27
- maxViewportWidth?: number | null;
28
- disableScroll?: boolean;
29
- focusOnElement?: string | null;
30
- focusAfterClose?: string | null;
31
- }) => {
32
- const modalRef = useRef<HTMLDivElement>(null);
33
- const previouslyFocusedElementRef = useRef<HTMLElement | null>(null);
34
-
35
- const handleKeyDown = useCallback(
36
- (e: KeyboardEvent) => {
37
- if (e.key === "Escape") {
38
- onClose();
39
- }
40
-
41
- if (e.key === "Tab") {
42
- const modal = modalRef.current;
43
- if (!modal) return;
44
-
45
- const focusableElements = Array.from(
46
- modal.querySelectorAll(
47
- 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'
48
- )
49
- );
50
- const firstFocusableElement = focusableElements[0] as HTMLElement;
51
- const lastFocusableElement = focusableElements[
52
- focusableElements.length - 1
53
- ] as HTMLElement;
54
-
55
- if (e.shiftKey) {
56
- if (document.activeElement === firstFocusableElement) {
57
- lastFocusableElement.focus();
58
- e.preventDefault();
59
- }
60
- } else {
61
- if (document.activeElement === lastFocusableElement) {
62
- firstFocusableElement.focus();
63
- e.preventDefault();
64
- }
65
- }
66
- }
67
- },
68
- [onClose]
69
- );
70
-
71
- const handleScroll = useCallback(
72
- (e: Event) => {
73
- if (disableScroll) {
74
- e.preventDefault();
75
- }
76
- },
77
- [disableScroll]
78
- );
79
-
80
- const handleDisplay = useCallback(() => {
81
- const modal = modalRef.current;
82
- if (!modal) return;
83
-
84
- const viewportWidth = window.innerWidth;
85
-
86
- if (
87
- (minViewportWidth && viewportWidth < minViewportWidth) ||
88
- (maxViewportWidth && viewportWidth > maxViewportWidth)
89
- ) {
90
- onClose();
91
- }
92
- }, [onClose, minViewportWidth, maxViewportWidth]);
93
-
94
- useLayoutEffect(() => {
95
- const modal = modalRef.current;
96
- if (!modal) return;
97
-
98
- const focusableElements = Array.from(
99
- modal.querySelectorAll(
100
- 'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])'
101
- )
102
- );
103
- const firstFocusableElement = focusableElements?.[0] as HTMLElement;
104
-
105
- previouslyFocusedElementRef.current = document.activeElement as HTMLElement;
106
-
107
- modal?.addEventListener("keydown", handleKeyDown);
108
- if (focusOnElement) {
109
- const elementToFocus = modal.querySelector(focusOnElement) as HTMLElement;
110
- elementToFocus?.focus();
111
- } else {
112
- firstFocusableElement?.focus();
113
- }
114
-
115
- if (disableScroll) {
116
- document.body.style.overflow = "hidden";
117
- document.body.style.paddingRight = "11px";
118
- window.addEventListener("scroll", handleScroll);
119
- }
120
-
121
- if (minViewportWidth || maxViewportWidth) {
122
- handleDisplay();
123
- }
124
-
125
- return () => {
126
- modal?.removeEventListener("keydown", handleKeyDown);
127
- if (focusAfterClose) {
128
- const elementToFocus = document.querySelector(
129
- focusAfterClose
130
- ) as HTMLElement;
131
- elementToFocus?.focus();
132
- } else {
133
- previouslyFocusedElementRef.current?.focus();
134
- }
135
-
136
- if (disableScroll) {
137
- document.body.style.overflow = "";
138
- document.body.style.paddingRight = "";
139
- window.removeEventListener("scroll", handleScroll);
140
- }
141
- };
142
- }, [
143
- onClose,
144
- disableScroll,
145
- handleKeyDown,
146
- handleScroll,
147
- handleDisplay,
148
- minViewportWidth,
149
- maxViewportWidth,
150
- focusOnElement,
151
- focusAfterClose,
152
- ]);
153
-
154
- const backdropStyle: React.CSSProperties = {
155
- backgroundColor:
156
- background === "none" ? "transparent" : "var(--clr-modal-background)",
157
- };
158
-
159
- return createPortal(
160
- <motion.div
161
- initial={{ opacity: 0 }}
162
- animate={{ opacity: 1 }}
163
- exit={{ opacity: 0 }}
164
- onClick={(e) => {
165
- e.stopPropagation();
166
- if (e.currentTarget === e.target && closeOnBackdropClick) onClose();
167
- }}
168
- onKeyDown={(e) => {
169
- e.stopPropagation();
170
- }}
171
- ref={modalRef}
172
- className={`${styles.container}`}
173
- style={backdropStyle}
174
- id="dialog"
175
- role="dialog"
176
- aria-modal="true"
177
- >
178
- {children}
179
- </motion.div>,
180
- document.body
181
- );
182
- };
@@ -1,105 +0,0 @@
1
- .container {
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- bottom: 0;
6
- right: 0;
7
- width: fit-content;
8
- max-width: 320px;
9
- height: fit-content;
10
- margin: auto;
11
- background-color: var(--clr-background);
12
- padding: 2em;
13
- border-radius: 1rem;
14
- }
15
- .container .logo {
16
- display: grid;
17
- place-items: center;
18
- margin-bottom: 1em;
19
- }
20
- .container .logo svg {
21
- width: var(--fs-kilo);
22
- height: var(--fs-kilo);
23
- fill: var(--clr-primary);
24
- }
25
- .container h1 {
26
- font-size: var(--fs-h2);
27
- font-weight: var(--fw-700);
28
- margin-bottom: 0.5em;
29
- }
30
- .container p {
31
- font-size: var(--fs-milli);
32
- color: var(--clr-tertiary);
33
- margin-bottom: 2rem;
34
- line-height: 1.4;
35
- }
36
- .container .buttons {
37
- display: grid;
38
- gap: 0.8rem;
39
- }
40
- .container .buttons button {
41
- display: grid;
42
- place-items: center;
43
- padding: 0.9em;
44
- border-radius: 100vmax;
45
- font-size: var(--fs-milli);
46
- font-weight: var(--fw-700);
47
- cursor: pointer;
48
- transition: background-color 0.2s ease;
49
- }
50
- .container .buttons .delete {
51
- background-color: var(--clr-red);
52
- }
53
- .container .buttons .delete:hover {
54
- background-color: var(--clr-red-hover);
55
- }
56
- .container .buttons .delete:active {
57
- background-color: var(--clr-red-active);
58
- }
59
- .container .buttons .delete:focus-visible {
60
- outline: 2px solid var(--clr-secondary);
61
- background-color: var(--clr-red-hover);
62
- }
63
- .container .buttons .unfollow {
64
- background-color: var(--clr-secondary);
65
- color: var(--clr-background);
66
- }
67
- .container .buttons .unfollow:hover {
68
- background-color: var(--clr-secondary-hover);
69
- }
70
- .container .buttons .unfollow:active {
71
- background-color: var(--clr-secondary-active);
72
- }
73
- .container .buttons .unfollow:focus-visible {
74
- outline: 2px solid var(--clr-secondary);
75
- }
76
- .container .buttons .signout {
77
- background-color: var(--clr-secondary);
78
- color: var(--clr-background);
79
- }
80
- .container .buttons .signout:hover {
81
- background-color: var(--clr-signout-logout-hover);
82
- }
83
- .container .buttons .signout:active {
84
- background-color: var(--clr-signout-logout-active);
85
- }
86
- .container .buttons .signout:focus-visible {
87
- outline: 2px solid var(--clr-secondary);
88
- background-color: var(--clr-signout-logout-hover);
89
- }
90
- .container .buttons .cancel {
91
- color: var(--clr-secondary);
92
- border: 1px solid var(--clr-tertiary);
93
- }
94
- .container .buttons .cancel:hover {
95
- background-color: var(--clr-trends-hover);
96
- }
97
- .container .buttons .cancel:active {
98
- background-color: var(--clr-trends-active);
99
- }
100
- .container .buttons .cancel:focus-visible {
101
- outline: 2px solid var(--clr-secondary);
102
- background-color: var(--clr-trends-hover);
103
- }
104
-
105
- /*# sourceMappingURL=confirmation-modal.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/modal/components/styles/confirmation-modal.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIJ;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;;AAIJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;;AAEA;EACE;;AAGF;EACE;;AAGF;EACE;EACA","file":"confirmation-modal.module.css"}
@@ -1,125 +0,0 @@
1
- .container {
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- bottom: 0;
6
- right: 0;
7
- width: fit-content;
8
- max-width: 320px;
9
- height: fit-content;
10
- margin: auto;
11
- background-color: var(--clr-background);
12
- padding: 2em;
13
- border-radius: 1rem;
14
-
15
- .logo {
16
- display: grid;
17
- place-items: center;
18
- margin-bottom: 1em;
19
-
20
- svg {
21
- width: var(--fs-kilo);
22
- height: var(--fs-kilo);
23
- fill: var(--clr-primary);
24
- }
25
- }
26
-
27
- h1 {
28
- font-size: var(--fs-h2);
29
- font-weight: var(--fw-700);
30
- margin-bottom: 0.5em;
31
- }
32
-
33
- p {
34
- font-size: var(--fs-milli);
35
- color: var(--clr-tertiary);
36
- margin-bottom: 2rem;
37
- line-height: 1.4;
38
- }
39
-
40
- .buttons {
41
- display: grid;
42
- gap: 0.8rem;
43
-
44
- button {
45
- display: grid;
46
- place-items: center;
47
- padding: 0.9em;
48
- border-radius: 100vmax;
49
- font-size: var(--fs-milli);
50
- font-weight: var(--fw-700);
51
- cursor: pointer;
52
- transition: background-color 0.2s ease;
53
- }
54
-
55
- .delete {
56
- background-color: var(--clr-red);
57
-
58
- &:hover {
59
- background-color: var(--clr-red-hover);
60
- }
61
-
62
- &:active {
63
- background-color: var(--clr-red-active);
64
- }
65
-
66
- &:focus-visible {
67
- outline: 2px solid var(--clr-secondary);
68
- background-color: var(--clr-red-hover);
69
- }
70
- }
71
-
72
- .unfollow {
73
- background-color: var(--clr-secondary);
74
- color: var(--clr-background);
75
-
76
- &:hover {
77
- background-color: var(--clr-secondary-hover);
78
- }
79
-
80
- &:active {
81
- background-color: var(--clr-secondary-active);
82
- }
83
-
84
- &:focus-visible {
85
- outline: 2px solid var(--clr-secondary);
86
- }
87
- }
88
-
89
- .signout {
90
- background-color: var(--clr-secondary);
91
- color: var(--clr-background);
92
-
93
- &:hover {
94
- background-color: var(--clr-signout-logout-hover);
95
- }
96
-
97
- &:active {
98
- background-color: var(--clr-signout-logout-active);
99
- }
100
-
101
- &:focus-visible {
102
- outline: 2px solid var(--clr-secondary);
103
- background-color: var(--clr-signout-logout-hover);
104
- }
105
- }
106
-
107
- .cancel {
108
- color: var(--clr-secondary);
109
- border: 1px solid var(--clr-tertiary);
110
-
111
- &:hover {
112
- background-color: var(--clr-trends-hover);
113
- }
114
-
115
- &:active {
116
- background-color: var(--clr-trends-active);
117
- }
118
-
119
- &:focus-visible {
120
- outline: 2px solid var(--clr-secondary);
121
- background-color: var(--clr-trends-hover);
122
- }
123
- }
124
- }
125
- }
@@ -1,10 +0,0 @@
1
- .container {
2
- z-index: var(--z-index-modal-backdrop);
3
- position: fixed;
4
- top: 0;
5
- left: 0;
6
- width: 100%;
7
- height: 100%;
8
- }
9
-
10
- /*# sourceMappingURL=modal.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../../src/components/elements/modal/components/styles/modal.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA","file":"modal.module.css"}
@@ -1,8 +0,0 @@
1
- .container {
2
- z-index: var(--z-index-modal-backdrop);
3
- position: fixed;
4
- top: 0;
5
- left: 0;
6
- width: 100%;
7
- height: 100%;
8
- }
@@ -1,49 +0,0 @@
1
- "use client";
2
- import { useState, useLayoutEffect } from "react";
3
-
4
- export const useTrackPosition = ({
5
- buttonRef,
6
- trackScroll = false,
7
- }: {
8
- buttonRef: React.RefObject<HTMLButtonElement>;
9
- trackScroll?: boolean;
10
- }) => {
11
- const [buttonBoundaries, setButtonBoundaries] = useState<DOMRect | null>(
12
- buttonRef?.current?.getBoundingClientRect() ?? null,
13
- );
14
-
15
- useLayoutEffect(() => {
16
- const handleResize = () => {
17
- if (buttonRef?.current) {
18
- setButtonBoundaries(buttonRef.current.getBoundingClientRect());
19
- }
20
- };
21
-
22
- window.addEventListener("resize", handleResize);
23
- if (trackScroll) {
24
- window.addEventListener("scroll", handleResize);
25
- }
26
-
27
- return () => {
28
- window.removeEventListener("resize", handleResize);
29
- if (trackScroll) {
30
- window.removeEventListener("scroll", handleResize);
31
- }
32
- };
33
- }, [
34
- buttonRef,
35
- buttonRef.current?.getBoundingClientRect,
36
- trackScroll,
37
- setButtonBoundaries,
38
- ]);
39
-
40
- useLayoutEffect(() => {
41
- setButtonBoundaries(buttonRef.current?.getBoundingClientRect() ?? null);
42
- }, [
43
- buttonRef,
44
- buttonRef.current?.getBoundingClientRect,
45
- setButtonBoundaries,
46
- ]);
47
-
48
- return buttonBoundaries;
49
- };
@@ -1,3 +0,0 @@
1
- export * from "./components/modal";
2
- export * from "./components/confirmation-modal";
3
- export * from "./hooks/use-track-position";
@@ -1,17 +0,0 @@
1
- import { z } from "zod";
2
-
3
- const envSchema = z.object({
4
- NODE_ENV: z.enum(["development", "production"]),
5
- OXY_AUTH_URL: z.string().url(),
6
- });
7
-
8
- declare global {
9
- // eslint-disable-next-line @typescript-eslint/no-namespace
10
- namespace NodeJS {
11
- interface ProcessEnv extends z.infer<typeof envSchema> {}
12
- }
13
- }
14
-
15
- export const NODE_ENV = process.env.NODE_ENV;
16
- export const OXY_AUTH_URL =
17
- NODE_ENV === "production" ? "https://auth.oxy.so" : "http://localhost:3001";
@@ -1,30 +0,0 @@
1
- import Image from "next/image";
2
- import React from "react";
3
-
4
- import { cn } from "../../../utils/cn";
5
-
6
- interface IAvatar extends React.ImgHTMLAttributes<HTMLImageElement> {
7
- userImage: string | null | undefined;
8
- className?: string;
9
- width?: number;
10
- height?: number;
11
- }
12
-
13
- export const Avatar = ({ userImage, className, ...props }: IAvatar) => {
14
- return (
15
- <div
16
- className={cn(
17
- "relative aspect-square w-[calc(var(--tw-fs-kilo)+9px)] overflow-hidden rounded-full",
18
- className
19
- )}
20
- >
21
- <Image
22
- {...props}
23
- src={userImage || `/user_placeholder.png`}
24
- alt="profile picture"
25
- fill={true}
26
- className="block size-full object-cover"
27
- />
28
- </div>
29
- );
30
- };
@@ -1,15 +0,0 @@
1
- .container {
2
- position: relative;
3
- width: var(--avatar-width);
4
- border-radius: 50%;
5
- overflow: hidden;
6
- aspect-ratio: 1/1;
7
- }
8
- .container img {
9
- display: block;
10
- width: 100%;
11
- height: 100%;
12
- object-fit: cover;
13
- }
14
-
15
- /*# sourceMappingURL=avatar.module.css.map */
@@ -1 +0,0 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../../src/features/profile/components/styles/avatar.module.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA","file":"avatar.module.css"}
@@ -1,14 +0,0 @@
1
- .container {
2
- position: relative;
3
- width: var(--avatar-width);
4
- border-radius: 50%;
5
- overflow: hidden;
6
- aspect-ratio: 1 / 1;
7
-
8
- img {
9
- display: block;
10
- width: 100%;
11
- height: 100%;
12
- object-fit: cover;
13
- }
14
- }