Skip to content

Commit 788cd75

Browse files
committed
CodeQL fixes
1 parent cf66bb6 commit 788cd75

6 files changed

Lines changed: 7 additions & 22 deletions

File tree

apps/web/app/(with-contexts)/dashboard/(sidebar)/mails/broadcast/[id]/page.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default function Page({
7272
const [delay, setDelay] = useState(0);
7373
const [showScheduleInput, setShowScheduleInput] = useState(false);
7474
const [emailId, setEmailId] = useState<string | undefined>();
75-
const [published, setPublished] = useState(true);
75+
// const [published, setPublished] = useState(true);
7676
const [filteredUsersCount, setFilteredUsersCount] = useState(0);
7777
const [confirmationDialogOpen, setConfirmationDialogOpen] = useState(false);
7878
const [report, setReport] = useState<SequenceReport>();
@@ -115,7 +115,7 @@ export default function Page({
115115
setContent(sequence.emails[0].content);
116116
setDelay(sequence.emails[0].delayInMillis);
117117
setEmailId(sequence.emails[0].emailId);
118-
setPublished(sequence.emails[0].published);
118+
// setPublished(sequence.emails[0].published);
119119
if (sequence.filter) {
120120
setFilters(sequence.filter.filters);
121121
setFiltersAggregator(sequence.filter.aggregator);
@@ -370,7 +370,7 @@ export default function Page({
370370
setContent(sequence.emails[0].content);
371371
setDelay(sequence.emails[0].delayInMillis);
372372
setEmailId(sequence.emails[0].emailId);
373-
setPublished(sequence.emails[0].published);
373+
// setPublished(sequence.emails[0].published);
374374
if (sequence.filter) {
375375
setFilters(sequence.filter.filters);
376376
setFiltersAggregator(sequence.filter.aggregator);
@@ -448,7 +448,7 @@ export default function Page({
448448
setContent(sequence.emails[0].content);
449449
setDelay(sequence.emails[0].delayInMillis);
450450
setEmailId(sequence.emails[0].emailId);
451-
setPublished(sequence.emails[0].published);
451+
// setPublished(sequence.emails[0].published);
452452
if (sequence.filter) {
453453
setFilters(sequence.filter.filters);
454454
setFiltersAggregator(sequence.filter.aggregator);
@@ -578,11 +578,7 @@ export default function Page({
578578
</p>
579579
</Dialog2>
580580
<Button
581-
variant={
582-
showScheduleInput
583-
? "secondary"
584-
: "ghost"
585-
}
581+
variant="ghost"
586582
className="gap-2"
587583
onClick={() => {
588584
setShowScheduleInput(true);

apps/web/app/(with-contexts)/dashboard/mail/drip/[productId]/[sectionId]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function DripEmailEditorPage({
3838
src={`/dashboard/mail/drip/${productId}/${sectionId}/internal`}
3939
redirectTo={
4040
redirectTo ||
41-
"/dashboard/product/${productId}/content/section/${sectionId}"
41+
`/dashboard/product/${productId}/content/section/${sectionId}`
4242
}
4343
title={
4444
productLoaded

packages/email-editor/src/blocks/image/settings.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ export function ImageSettings({
4848
// Get numeric values from settings
4949
const borderRadius = pxToNumber(block.settings.borderRadius, 0);
5050
const borderWidth = pxToNumber(block.settings.borderWidth, 0);
51-
const paddingTop = pxToNumber(block.settings.paddingTop, 0);
52-
const paddingBottom = pxToNumber(block.settings.paddingBottom, 0);
5351

5452
// Sample images
5553
const sampleImages = [

packages/email-editor/src/blocks/link/settings.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ export function LinkSettings({ block, style, updateBlock }: LinkSettingsProps) {
3333
return match ? Number.parseInt(match[1], 10) : defaultValue;
3434
};
3535

36-
// Get numeric values from settings
37-
const fontSize = pxToNumber(block.settings.fontSize, 16);
38-
const paddingTop = pxToNumber(block.settings.paddingTop, 0);
39-
const paddingBottom = pxToNumber(block.settings.paddingBottom, 0);
40-
4136
// Font size options
4237
const fontSizeOptions = [
4338
{ value: "12px", label: "12px" },

packages/email-editor/src/blocks/text/settings.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ export function TextSettings({ block, style, updateBlock }: TextSettingsProps) {
3232
return match ? Number.parseInt(match[1], 10) : defaultValue;
3333
};
3434

35-
// Get numeric values from settings
36-
const paddingTop = pxToNumber(block.settings.paddingTop, 0);
37-
const paddingBottom = pxToNumber(block.settings.paddingBottom, 0);
38-
3935
// Font size options
4036
const fontSizeOptions = [
4137
{ value: "12px", label: "12px" },

packages/email-editor/src/components/email-editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export function EmailEditor({
120120
);
121121
const [movingBlockId, setMovingBlockId] = useState<string | null>(null);
122122
const [selectedBlockId, setSelectedBlockId] = useState<string | null>(null);
123-
const [showSettings, setShowSettings] = useState(true);
123+
const [showSettings] = useState(true);
124124

125125
// Update email when initialEmail prop changes
126126
useEffect(() => {

0 commit comments

Comments
 (0)