Skip to content

Commit e3367fa

Browse files
committed
Update strict equality check and rename "links" to "platforms" in donations component
1 parent d2efe26 commit e3367fa

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎apps/editor/src/utils/intelligent-update-utils.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export const get_intelligent_update_config = async (
152152
RECENTLY_USED_INTELLIGENT_UPDATE_CONFIG_IDS_STATE_KEY
153153
) || []
154154

155-
recents = [selected.id, ...recents.filter((id) => id !== selected.id)]
155+
recents = [selected.id, ...recents.filter((id) => id != selected.id)]
156156

157157
context.workspaceState.update(
158158
RECENTLY_USED_INTELLIGENT_UPDATE_CONFIG_IDS_STATE_KEY,

‎packages/ui/src/components/editor/panel/Donations/Donations.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
user-select: text;
1414
}
1515

16-
.links {
16+
.platforms {
1717
display: flex;
1818
flex-direction: column;
1919
padding: 0 12px;

‎packages/ui/src/components/editor/panel/Donations/Donations.tsx‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export type DonationsProps = {
8484

8585
export const Donations: React.FC<DonationsProps> = (props) => {
8686
const observer_target = useRef<HTMLDivElement>(null)
87-
const [is_links_collapsed, set_links_collapsed] = useState(true)
87+
const [is_platforms_collapsed, set_platforms_collapsed] = useState(true)
8888
const [is_wallets_collapsed, set_wallets_collapsed] = useState(true)
8989

9090
useEffect(() => {
@@ -105,7 +105,7 @@ export const Donations: React.FC<DonationsProps> = (props) => {
105105
return () => observer.unobserve(target)
106106
}, [props.on_fetch_next_page])
107107

108-
const links = [
108+
const platforms = [
109109
{
110110
label: 'Buy Me A Coffee ↗',
111111
url: 'https://buymeacoffee.com/robertpiosik'
@@ -149,23 +149,23 @@ export const Donations: React.FC<DonationsProps> = (props) => {
149149
Hey there! Donating is a great way to show your support for the
150150
project. Thank you.
151151
</div>
152-
<div className={styles.links}>
152+
<div className={styles.platforms}>
153153
<Fieldset
154-
is_collapsed={is_links_collapsed}
155-
label="Links"
154+
is_collapsed={is_platforms_collapsed}
155+
label="Platforms"
156156
on_toggle_collapsed={() =>
157-
set_links_collapsed(!is_links_collapsed)
157+
set_platforms_collapsed(!is_platforms_collapsed)
158158
}
159159
>
160-
<div className={styles.links__content}>
161-
{links.map((link) => (
160+
<div className={styles.platforms__content}>
161+
{platforms.map((link) => (
162162
<a
163163
href={link.url}
164-
className={styles.links__item}
164+
className={styles.platforms__item}
165165
key={link.url}
166166
>
167167
<strong>{link.label}</strong>
168-
<span className={styles.links__item__url}>
168+
<span className={styles.platforms__item__url}>
169169
{format_url_for_display(link.url)}
170170
</span>
171171
</a>

0 commit comments

Comments
 (0)